package com.mxin.common.init

import android.app.Application
import android.content.Context
import com.mxin.common.GlobalApp
import com.mxin.common.log.LogA

class CommonInit {

    private lateinit var context: Context

    companion object{

        private val manager by lazy { CommonInit() }

        fun getInstance(context: Context):CommonInit{
            manager.context = context
            manager.init(context)
            return manager
        }

    }

    private fun init(context: Context){
        LogA.d("启动初始化 CommonInit.init()")
        GlobalApp.init(context as Application)
    }


}